package cn.kgc.cjk_yy.tools;

import java.util.List;

/**
 * Created by Administrator on 2018/9/16 0016.
 */
public class Page {
    //当前页
    private int pageNumber;
    //总信息数
    private int totalCount;
    //页面容量
    private int pageSize;
    //总页数-totalCount/pageSize（+1）
    private int totalPageCount;
    //每页信息
    private List pageDate;
    //分页初始查询位置
    private int staticquery;
    //用户名
    private String devcode;


    //软件名字
    private String querySoftwareName;
    //APP状态
    private String queryStatus;


    //app所属平台名称
    private String queryFlatformId;
    //一级分类
    private String categoryLevel1Name;
    //二级分类
    private String categoryLevel2Name;
    //三级分类
    private String categoryLevel3Name;

    public Page(int pageNumber, int pageSize, String devcode, String querySoftwareName, String queryStatus, String queryFlatformId, String categoryLevel1Name, String categoryLevel2Name, String categoryLevel3Name) {
        this.pageNumber = pageNumber;
        this.pageSize = pageSize;
        this.devcode =devcode;




        this.querySoftwareName = querySoftwareName;
        this.queryStatus = queryStatus;
        this.queryFlatformId = queryFlatformId;
        this.categoryLevel1Name = categoryLevel1Name;
        this.categoryLevel2Name = categoryLevel2Name;
        this.categoryLevel3Name = categoryLevel3Name;
    }

    public int getPageNumber() {
        return pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPageCount() {
        return         this.totalPageCount = (totalCount+pageSize-1)/pageSize;
    }




    public List getPageDate() {
        return pageDate;
    }

    public void setPageDate(List pageDate) {
        this.pageDate = pageDate;
    }

    public String getDevcode() {
        return devcode;
    }

    public void setDevcode(String devCode) {
        this.devcode = devCode;
    }

    public String getQuerySoftwareName() {
        return querySoftwareName;
    }

    public void setQuerySoftwareName(String querySoftwareName) {
        this.querySoftwareName = querySoftwareName;
    }

    public String getQueryStatus() {
        return queryStatus;
    }

    public void setQueryStatus(String queryStatus) {
        this.queryStatus = queryStatus;
    }

    public String getQueryFlatformId() {
        return queryFlatformId;
    }

    public void setQueryFlatformId(String queryFlatformId) {
        this.queryFlatformId = queryFlatformId;
    }

    public String getCategoryLevel1Name() {
        return categoryLevel1Name;
    }

    public void setCategoryLevel1Name(String categoryLevel1Name) {
        this.categoryLevel1Name = categoryLevel1Name;
    }

    public String getCategoryLevel2Name() {
        return categoryLevel2Name;
    }

    public void setCategoryLevel2Name(String categoryLevel2Name) {
        this.categoryLevel2Name = categoryLevel2Name;
    }

    public String getCategoryLevel3Name() {
        return categoryLevel3Name;
    }

    public void setCategoryLevel3Name(String categoryLevel3Name) {
        this.categoryLevel3Name = categoryLevel3Name;
    }

    public int getStaticquery() {
        return this.staticquery = (pageNumber-1)*pageSize;
    }


    @Override
    public String toString() {
        return "Page{" +
                "pageNumber=" + pageNumber +
                ", totalCount=" + totalCount +
                ", pageSize=" + pageSize +
                ", totalPageCount=" + totalPageCount +
                ", pageDate=" + pageDate +
                ", staticquery=" + staticquery +
                ", devcode='" + devcode + '\'' +
                ", querySoftwareName='" + querySoftwareName + '\'' +
                ", queryStatus='" + queryStatus + '\'' +
                ", queryFlatformId='" + queryFlatformId + '\'' +
                ", categoryLevel1Name='" + categoryLevel1Name + '\'' +
                ", categoryLevel2Name='" + categoryLevel2Name + '\'' +
                ", categoryLevel3Name='" + categoryLevel3Name + '\'' +
                '}';
    }
}
